#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
    int n = 0;
    int count = 1;
    scanf("%d", &n);
    if (n < 2)
    {
        printf("%d", 0);
    }
    else
    {
        for (int i = 3; i <= n; i++)
        {
            int flag = 1;
            for (int j = 2; j <= sqrt(i); j++)
            {
                if (i % j == 0)
                {
                    flag = 0;
                }
            }
            if (flag == 1)
            {
                count++;
            }
        }
        printf("%d", count);
    }
}